package org.gfix.parser;

/**
 * Indicates a fault with the the fix message, some or all of the fields
 * may be populated depending on the nature of the fault.
 * @author alan
 *
 */
public class FixParseFault {

	public enum Serverity{ERROR, WARNING}
	
	private int tag;
	private String message;
	private int location;
	private String tagContent;
	private Serverity  serverity;
	
	FixParseFault(int tag, String message, int location, String tagContent,
			Serverity serverity) {
		super();
		this.tag = tag;
		this.message = message;
		this.location = location;
		this.tagContent = tagContent;
		this.serverity = serverity;
	}
	
	public int getTag() {
		return tag;
	}
	public String getMessage() {
		return message;
	}
	public int getLocation() {
		return location;
	}
	public String getTagContent() {
		return tagContent;
	}

	public Serverity getServerity() {
		return serverity;
	}

	@Override
	public String toString() {
		return "FixParseFault [location=" + location + ", message=" + message
				+ ", serverity=" + serverity + ", tag=" + tag + ", tagContent="
				+ tagContent + "]";
	}
}
